package com.assessment.repository.impl;

import com.assessment.mapper.DepartmentMapper;
import com.assessment.mapper.PositionMapper;
import com.assessment.mapper.TeacherMapper;
import com.assessment.model.entity.Department;
import com.assessment.model.entity.Position;
import com.assessment.model.entity.Teacher;
import com.assessment.repository.TeacherRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * 教师仓储实现类
 */
@Repository
public class TeacherRepositoryImpl implements TeacherRepository {

    @Autowired
    private TeacherMapper teacherMapper;

    @Autowired
    private DepartmentMapper departmentMapper;

    @Autowired
    private PositionMapper positionMapper;

    @Override
    public Teacher getTeacherById(Integer teacherId) {
        return teacherMapper.selectById(teacherId);
    }

    @Override
    public Department getDepartmentById(Integer departmentId) {
        return departmentMapper.selectById(departmentId);
    }

    @Override
    public Position getPositionById(Integer positionId) {
        return positionMapper.selectById(positionId);
    }
}
